package ustc.running.util;

import android.app.Service;
import android.content.Context;
import android.os.Vibrator;

/**
 * 手机震动
 *
 */
public class VibratorUtil {
	
	/**
	 * 操作手机震动
	 * @param context
	 */
	public static void vibrateTwice(Context context){
		Vibrator mVibrator01 = ( Vibrator )context.getSystemService( Service .VIBRATOR_SERVICE );
		mVibrator01.vibrate( new long[]{10,100,100,100},-1); 
	}
	
	public static void vibrateOnce(Context context){
		Vibrator mVibrator01 = ( Vibrator )context.getSystemService( Service .VIBRATOR_SERVICE );
		mVibrator01.vibrate( new long[]{10,100},-1); 
	}
}
